<?php
class Comment_model extends MY_Model{
	function __construct(){

		parent::__construct();
		$this->_prefix = "com";
		$this->_column = array(
								'id'		=>$this->_prefix."_id",
								'title'		=>$this->_prefix."_title",
								'content'	=>$this->_prefix."_content",
								'usr_ip'	=>$this->_prefix."_usr_ip",
								'status'	=>$this->_prefix."_status",
								'pos_id'	=>$this->_prefix."_pos_id",
								'parent_id'	=>$this->_prefix."_parent_id",
								'usr_id'	=>$this->_prefix."_usr_id",
								'cr_date'	=>$this->_prefix."_cr_date",
								'lu_uid'	=>$this->_prefix."_lu_uid",
								'lu_date'	=>$this->_prefix."_lu_date"


			);
	}
function get($options = NULL){
    //$this->db->where("pos_type","restaurant");
    $comment = parent::get($options);
    return $comment;
    
  }
function getUsr($options = NULL){
	    $comment = parent::get($options);
	    if(!empty($comment)){
	    foreach ($comment as $key => $value) {
	        $comment[$key]["user"] = $this->ion_auth->user_array($value["usr_id"]);
	    }
	}
	    return $comment;
    
  		
	}
}
?>